from django.conf.urls.defaults import *
from django.conf import settings

urlpatterns = patterns('',
    
    (r'^admin/', include('django.contrib.admin.urls')),
    (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', {'packages': 'django.conf'}),
    (r'^appmedia/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
    #(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.ADMIN_MEDIA_ROOT}),
        
    (r'^accounts/login/$', 'pds.views.login_user'),
    (r'^accounts/logout/$', 'pds.views.logout_user'),
    
    (r'^registration/$', 'pds.views.registration'),
    
    (r'^check_login/$', 'pds.views.check_login'),
    
    (r'^iphone/accounts/login/$', 'pds.views.login_user', {"iphone": True}),
    (r'^iphone/accounts/logout/$', 'pds.views.logout_user', {"iphone": True}),
    (r'^iphone/registration/$', 'pds.views.registration', {"iphone": True}),
    
    (r'', include('pds.urls')),
    (r'', include('articles.urls')),
    (r'', include('comments.urls')),
    
    (r'', include('captcha.urls')),
    
    (r'', include('django_openidconsumer.urls')),
)
